#include <iostream>
using namespace std;

const int kMaxN = 1e5 + 10;

int f[kMaxN], t[kMaxN];

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;

  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
  }

  for (int i = 1; i <= n; i++) {
    f[i] = f[i - 1] + 20;
    for (int j = i - 1; j > 0 && t[i] - t[j] < 1440; j--) {
      if (t[i] - t[j] < 90) {
        f[i] = min(f[i], f[j - 1] + 50);
      }
      f[i] = min(f[i], f[j - 1] + 120);
    }
  }

  for (int i = 1; i <= n; i++) {
    cout << f[i] - f[i - 1] << "\n";
  }
  return 0;
}